package com.zhang.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhang.common.util.result.R;
import com.zhang.system.entity.AdminUser;
import com.zhang.system.entity.UserInfoVo;
import com.zhang.system.entity.UserSearch;
import com.zhang.system.vo.AdminUserCompositionStatisticVO;


import java.util.List;

/**
 * <p>
 * 系统用户表 服务类
 * </p>
 *
 * @author 战神
 * @since 2023-07-02
 */
public interface IAdminUserService extends IService<AdminUser> {
    <T> R adminUserLogin(T key, String password,String type);

    /**
     * 添加管理用户
     *
     * @param adminUser 管理用户
     * @return {@link R}
     */
    R addAdminUser(AdminUser adminUser);



    /**
     * 获取用户信息
     *
     * @param userId 用户id
     * @return {@link AdminUser}
     */
    AdminUser getUserInfo(Long userId);

    UserInfoVo getUserInfVo(Long userId);

    /**
     * 搜索用户信息
     *
     * @param userSearch 用户搜索条件
     * @return {@link List}<{@link AdminUser}>
     */
    List<AdminUser> userSeach(UserSearch userSearch);

    boolean isAdmin(Long adminUserId);

    R updateAdminUser(AdminUser adminUser);

    List<AdminUser> getUserListFromRoleKeys(List<String> roleKeys);

    AdminUserCompositionStatisticVO UserCompositionStatistic();
}
